from django.conf.urls.defaults import *
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
from django.contrib.auth.views import login, logout
from django.conf import settings
from django.views.static import serve

admin.autodiscover()

urlpatterns = patterns('hosts.views',
    (r'^$','index'),
    (r'^accounts/login/$', login),
    (r'^accounts/logout/$', logout),
    (r'^hosts/', include('hosts.urls')),
    (r'^profile/', include('profiles.urls')),
    (r'^databases/', include('databases.urls')),
    (r'^domains/', include('domains.urls')),
    (r'^ftp/', include('ftp.urls')),
    # Example:
    # (r'^hosting/', include('hosting.foo.urls')),

    # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
    # to INSTALLED_APPS to enable admin documentation:
    (r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    (r'^admin/(.*)', admin.site.root),
    (r'^i18n/', include('django.conf.urls.i18n')),
    (r'^static/(?P<path>.*)$', serve, {'document_root': settings.MEDIA_ROOT, 'show_indexes': True},),
)
